﻿using BCCommon;
using BCDto.Common.News.ContentCategory;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCService.Common.News.ContentCategory
{
    /// <summary>
    /// 内容分类服务接口
    /// </summary>
    public interface IContentCategoryService
    {
        /// <summary>
        /// 获取内容分类信息（分页）
        /// </summary>
        /// <param name="categoryLevel">分类级别</param>
        /// <param name="categoryName">分类名称</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="sortName">排序字段</param>
        /// <param name="ascending">升序</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        PageableList<ContentCategoryDto> Query(int? categoryLevel, string categoryName, DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);
        /// <summary>
        /// 创建一条新闻
        /// </summary>
        /// <param name="dto">新增新闻的内容</param>
        /// <returns></returns>
        ContentCategoryDto Create(ContentCategoryRequestDto dto);
        /// <summary>
        /// 修改内容分类信息
        /// </summary>
        /// <param name="contentCategoryId">内容分类Id</param>
        /// <param name="dto">内容分类信息</param>
        /// <returns></returns>
        ContentCategoryDto Update(int contentCategoryId, ContentCategoryRequestDto dto);
        /// <summary>
        /// 删除内容分类信息
        /// </summary>
        /// <param name="contentCategoryId">内容分类Id</param>
        /// <returns></returns>
        bool Delete(int contentCategoryId);
        /// <summary>
        /// 获取内容分类信息
        /// </summary>
        /// <param name="contentCategoryId">内容分类Id</param>
        /// <returns></returns>
        ContentCategoryDto GetContentCategoryById(int contentCategoryId);
        /// <summary>
        /// 获取下一级分类列表
        /// </summary>
        /// <param name="contentCategoryId">内容分类Id</param>
        /// <returns></returns>
        IEnumerable<ContentCategoryDto> GetNextCategoryById(int contentCategoryId);

        /// <summary>
        /// 获取某级别分类列表
        /// </summary>
        /// <param name="level">分类级别</param>
        /// <returns></returns>
        IEnumerable<ContentCategoryDto> GetLevelCategoryList(int level);

        /// <summary>
		/// 启用内容分类
		/// </summary>
		/// <param name="contentCategoryId">内容分类Id</param>
		bool Enabled(int contentCategoryId);
        /// <summary>
        /// 禁用内容分类
        /// </summary>
        /// <param name="contentCategoryId">内容分类Id</param>
        bool Disabled(int contentCategoryId);
    }
}
